package com.tanhua.common.utils;

import java.util.Map;

/**
 * @author feihao
 * @version 1.0
 * @date 2021/7/13 19:13
 */


public enum TypeEnum implements IntEnum {
    EACH_LOVE(1, "互相关注"),
    I_LIKE(2, "我关注"),
    FANS(3, "粉丝"),
    WHO_LOOK_ME(4, "谁看过我");

    private Integer value;
    private String desc;

    TypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }


    @Override
    public String toString() {
        return this.desc;
    }

    @Override
    public Integer getId() {
        return this.value;
    }

    private static Map<Integer, TypeEnum> INSTANCEMAP = EnumUtils
            .mapIntEnum(TypeEnum.class);

    public static TypeEnum getByCodeId(Integer codeId) {
        return INSTANCEMAP.get(codeId);
    }
}
